<template>
  <div>
    <button @click="count++">点击我</button>
    <button @click="increase">+1</button>
    <button @click="add(5)">+5</button>
    <button v-on:click="add(5)">+5</button>
    <p>你点击了 {{ count }} 次</p>
  </div>
</template>

<script setup>
import { ref } from 'vue';
const count = ref(0);
const increase = () => {
  count.value++;
}
const add = (num) => {
  count.value += num;
}
</script>

<style scoped></style>